package com.xueyu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xueyu.domain.bed.pageBean;
import com.xueyu.domain.personinfo.personinfoBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface personinfoDao extends BaseMapper<personinfoBean> {
    List<personinfoBean> personinfoSelectAll();

    List<personinfoBean> personinfoSelectPage(@Param("like") String like, @Param("page") pageBean page);
    List<personinfoBean> getID(int id);
    int personinfoadd(personinfoBean personinfoBean);
    int personinfoup(personinfoBean personinfoBean);
    int deletepersoninfo(int id);
    int count();

    @Select("selectMaxPersoninfoId")
    int selectMaxPersoninfoId();

    @Update("insertFaceUrl")
    int insertFaceUrl(@Param("newPath") String newPath,@Param("personId") int personId);

    String selectFaceUrlWhereId(int personId);

    @Select("selectInTime")
    String inTime();

    List<personinfoBean> selectPage_Where_state_In_1(@Param("like") String like, @Param("offset") int offset, @Param("pageSize") int pageSize);

    List<personinfoBean> selectPage_Where_state_In_2(@Param("like") String like, @Param("offset") int offset, @Param("pageSize") int pageSize);

    List<personinfoBean> selectPage_Where_state_In_3(@Param("like") String like, @Param("offset") int offset, @Param("pageSize") int pageSize);

    int count_state_In_1();
    int count_state_In_2();
    int count_state_In_3();

    int update_personify_state_1(int personId);
    int updateStateByPersonIds(List<Integer> personIds);

    int UpdateStatePersonTypeDay();

    int UpdateStatePersonTypeMonth();

    int UpdateStatePersonTypeYear();

    int update_personify_state_3(List<Integer> ids);

}
